#include<stdio.h>
#include<math.h>
#include<time.h>
int  main()
{
    srand((unsigned)time(NULL));
    int i,j,a1[100],max1,min1;
    float   a2[100],max2,min2,aver1=0,aver2=0;
    for(i=0;i<100;i++)
    {
	a1[i]=rand()%100;  aver1=aver1+a1[i];
    	if(a1[i]==0) {a2[i]=0; aver2=aver2+a2[i]; }
  	else   { a2[i]=1.0/a1[i]; aver2=aver2+a2[i]; }
        printf("%d %d %f\n",i+1,a1[i],a2[i]);
    }
    aver1=aver1/100;
    aver2=aver2/100;
    max1=a1[0];  min1=a1[0];
    max2=a2[0];  min2=a2[0];
    for(j=1;j<100;j++)
    {
  	if(a1[j]>max1) { max1=a1[j];  }
	if(a2[j]<min1) {  min1=a1[j]; }
	if(a2[j]>max2) { max2=a2[j];  }
        if(a2[j]<min2) {   min2=a2[j];}
    }
    printf("max %d %f\n",max1,max2);
    printf("min %d %f\n",min1,min2);
    printf("aver %f %f\n",aver1,aver2);
    return 0;
}
